#include <cmath>
#include <fstream>
#include "sv2_streamer.h"
#include <cmath>
#include <fstream>
#include <limits>
#include <vector>


using namespace std;


namespace sv2
{
  void StreamerCppNode_Rknn::run()
  {
    while (this->is_running())
    {
      std::unique_lock<std::mutex> lock(this->_full_queue_mtx);
      this->_full_cv.wait(lock, [this]{ return !this->_full_queue.empty(); });

      ImgMsg imgmsg = this->_full_queue.front();
      this->_full_queue.pop();
      // cv::imshow("imgmsg.img", imgmsg.img);
      // cv::waitKey(5);
      this->_vs.stream(imgmsg.img);
    }
  }
}
